package saeildamil.Ch18.sync;

import javax.swing.JOptionPane;

public class CircleThread implements Runnable {
	SharedArea sharedArea;
	int radius;

	public CircleThread(int radius) {
		this.radius = radius;
	}

	@Override
	public void run() {
		getArea();

	}

	private void getArea() {
		while(sharedArea.isReady != true);
		double result = radius * radius * sharedArea.result;
		JOptionPane.showMessageDialog(null, "원의 넓이는" + result + "㎠ 입니다.");
		
	}

}
